<template>
  <el-dialog
    title="详情"
    :close-on-click-modal="false"
    append-to-body
    :visible.sync="visible"
    class="jsbos-dialog jsbos-dialog_center"
    lock-scroll
    width="600px"
  >
    <el-row :gutter="15" class="">
      <el-form
        v-loading="loading"
        ref="elForm"
        :model="dataForm"
        size="small"
        label-width="100px"
        label-position="right"
      >
        <template v-if="!loading">
          <el-col :span="24">
            <el-form-item label="名字" prop="userName">
              <p>{{ dataForm.userName }}</p>
            </el-form-item>
          </el-col>
          <el-col :span="24">
            <el-form-item label="手机号" prop="userPhone">
              <p>{{ dataForm.userPhone }}</p>
            </el-form-item>
          </el-col>
          <el-col :span="24">
            <el-form-item label="是否抽奖" prop="pass">
              <p>{{ dataForm.pass }}</p>
            </el-form-item>
          </el-col>
          <el-col :span="24">
            <el-form-item label="备注" prop="remark">
              <p>{{ dataForm.remark }}</p>
            </el-form-item>
          </el-col>
        </template>
      </el-form>
    </el-row>
    <span slot="footer" class="dialog-footer">
      <el-button @click="visible = false"> 取 消</el-button>
    </span>
  </el-dialog>
</template>
<script>
import request from "@/utils/request";
import PrintBrowse from "@/components/print-browse";
import jsbos from "@/utils/jsbos";

export default {
  components: { PrintBrowse },
  props: [],
  data() {
    return {
      visible: false,
      loading: false,
      printBrowseVisible: false,
      printId: "",
      dataForm: {
        id: "",
        userName: "",
        userPhone: "",
        pass: 1,
        remark: "",
      },
    };
  },
  computed: {},
  watch: {},
  created() {},
  mounted() {},
  methods: {
    dataInfo(dataAll) {
      let _dataAll = dataAll;
      this.dataForm = _dataAll;
    },

    init(id) {
      this.dataForm.id = id || 0;
      this.visible = true;
      this.$nextTick(() => {
        if (this.dataForm.id) {
          this.loading = true;
          request({
            url: "/api/cms/CmsAwardUser/detail/" + this.dataForm.id,
            method: "get",
          }).then((res) => {
            this.dataInfo(res.data);
            this.loading = false;
          });
        }
      });
    },
  },
};
</script>
<style lang="scss" scoped>
.jsbos-row-style {
  padding: 10px 10px 10px 0;
  >>> .el-row {
    margin: 0 !important;
    padding: 0 16px;
  }
  .el-row:nth-child(0) {
    padding: 0px !important;
  }
  >>> .el-col {
    padding: 0px !important;
    .el-form-item {
      margin-bottom: -1px !important;
      margin-right: -1px;
      border: 1px solid var(--border-4) !important;
      background-color: var(--light-blue) !important;
    }
    .el-form-item__label {
      line-height: 38px;
      height: 100%;
    }
    .el-form-item__content {
      line-height: 38px;
      padding-left: 20px;
      background-color: var(--white) !important;
      border-left: 1px solid var(--border-4) !important;
    }
  }
}
</style>
